package br.com.gkarian.mydesk.formatter;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class DateFormatter {

	public static final String DD_MM_YYYY = "dd/MM/yyyy";
	
	public static String dateFormatter(Calendar calendar, String format) {
		
		if (calendar == null) {
			return null;
		}
		
		try {
			SimpleDateFormat sdf = new SimpleDateFormat(DD_MM_YYYY);
			return sdf.format(calendar.getTime());
		} catch (Exception e) {
			return null;
		}
	}
}
